package FrontOffice;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;

import javax.swing.WindowConstants;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JSeparator;
import javax.swing.JTabbedPane;

public class Hauptmenue extends javax.swing.JPanel {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	{
		// Set Look & Feel
		try {
			javax.swing.UIManager
					.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	private JLabel jAuswahl;
	private JSeparator jSeparator1;
	private JTabbedPane jTabbedPane2;
	private JButton jVokabeltrainer;
	private JButton Statistik_Button;
	private JTabbedPane jTabbedPane1;

	/**
	* Auto-generated main method to display this 
	* JPanel inside a new JFrame.
	*/
	public static void main(String[] args) {
		JFrame frame = new JFrame();
		frame.getContentPane().add(new Hauptmenue());
		frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
		frame.pack();
		frame.setVisible(true);
	}
	
	public Hauptmenue() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			this.setPreferredSize(new java.awt.Dimension(800, 600));
			this.setSize(800, 600);
			this.setLayout(null);
			{
				jAuswahl = new JLabel();
				this.add(jAuswahl);
				jAuswahl.setText("Was wollen Sie als n\u00E4chstes tun?");
				jAuswahl.setBounds(228, 35, 396, 16);
				jAuswahl.setFont(new java.awt.Font("Lucida Grande",1,18));
			}
			{
				jSeparator1 = new JSeparator();
				this.add(jSeparator1);
				jSeparator1.setBounds(44, 73, 704, 12);
			}
			{
				jTabbedPane1 = new JTabbedPane();
				this.add(jTabbedPane1);
				jTabbedPane1.setBounds(34, 97, 348, 294);
				{
					jVokabeltrainer = new JButton();
					jTabbedPane1.addTab("Zum Vokabeltrainer", null, jVokabeltrainer, null);
					jVokabeltrainer.setText("Vokabeltrainer starten");
					jVokabeltrainer.setBounds(94, 387, 227, 75);
					jVokabeltrainer.setFont(new java.awt.Font("Lucida Grande",1,16));
					jVokabeltrainer.addActionListener(new ActionListener() {
						@Override
						public void actionPerformed(ActionEvent evt) {
							jVokabeltrainerActionPerformed(evt);
						}
					});
				}
			}
			{
				jTabbedPane2 = new JTabbedPane();
				this.add(jTabbedPane2);
				jTabbedPane2.setBounds(412, 97, 348, 294);
				{
					Statistik_Button = new JButton();
					jTabbedPane2.addTab("Zur Statistik", null, Statistik_Button, null);
					Statistik_Button.setText("Statistik anzeigen");
					Statistik_Button.setBounds(433, 290, 327, 248);
					Statistik_Button.setFont(new java.awt.Font("Lucida Grande",1,16));
					Statistik_Button.addActionListener(new ActionListener() {
						@Override
						public void actionPerformed(ActionEvent evt) {
							Statistik_ButtonActionPerformed(evt);
						}
					});
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	private void jVokabeltrainerActionPerformed(ActionEvent evt) {
//		Start.getStart().getContentPane().removeAll();
//		LanguageSelect LS = new LanguageSelect();
//		Start.getStart().add(LS);
//		Start.getStart().validate();
		this.removeAll();
		add(new LanguageSelect());
		this.repaint();
	}
	
	private void Statistik_ButtonActionPerformed(ActionEvent evt) {
//		Start.getStart().getContentPane().removeAll();
//		Statistik ST = new Statistik();
//		Start.getStart().add(ST);
//		Start.getStart().validate();
		this.removeAll();
		add(new Statistik());
		this.repaint();
		
	}

}
